function partial(fn) {
    let _ = {}
    var args = [].slice.call(arguments, 1) // [1]
    return function() {
      // 找到args里面的 _ , 往其位置上填充arguments
      var len = args.length
      for (var i = 0; i < len; i++) {
        // args[i] = args[i] === _ ? arguments[0] : args[i];
        if (args[i] === _) {
          args[i] = arguments[0];
          [].shift.call(arguments)
        }
      }
      args = args.concat([].slice.call(arguments)) 
      return fn.apply(this, args)
    }
  }
  
let fn = function(a, b, c, d, e) {
    console.log([a, b, c, d, e]);
}

// let _part = partial(fn,1,2)
// _part(3,4,5)

// let _ = {}
// let _part = partial(fn,1,_,3,_,5)
// _part(2,4)
